projects
/
ostree.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b0bfb92
)
tests/libtest.sh: Print non-matching file on failure
author
Colin Walters
<walters@verbum.org>
Thu, 7 Jul 2016 21:36:08 +0000
(17:36 -0400)
committer
Atomic Bot
<atomic-devel@projectatomic.io>
Fri, 8 Jul 2016 18:38:11 +0000
(18:38 +0000)
We clean up the temporary directory on failure, which means it's hard
to know *why* a regex didn't match. Print it when we hit an error.
Closes: #383
Approved by: mbarnes
tests/libtest.sh
patch
|
blob
|
history
diff --git
a/tests/libtest.sh
b/tests/libtest.sh
index 2d064299cb93b5b8e09cce93b6084d7f71a60815..e93b9510aedbf76a5272f946c2405576732980da 100755
(executable)
--- a/
tests/libtest.sh
+++ b/
tests/libtest.sh
@@
-138,6
+138,7
@@
assert_file_has_content () {
if ! grep -q -e "$2" "$1"; then
sed -e 's/^/# /' < "$1" >&2
echo 1>&2 "File '$1' doesn't match regexp '$2'"
+ cat $1
exit 1
fi
}